void LoadImagesAndTimestamps(const int startFrame,
                             const int endFrame,
                             const string path2imgs,
                             vector<vector<string>> &vstrImageFilenames,
                             vector<double> &vTimestamps)
{ // 读取图像和对应的时间戳
    vstrImageFilenames.resize(3);
    ifstream fTimes;
    // 以左相机为基准  左相机时间戳  假设现在已经是对齐状态
    string strPathTimeFile = path2imgs + "/left_timestamps.txt"; // 左相机时间戳文件

    // 时间戳对齐函数
    // alignTimestamps(strPathTimeFile, path2imgs, vTimestamps); // 时间戳对齐

    string rearFile = path2imgs + "/imgs/cam0/";  // rear
    string rightFile = path2imgs + "/imgs/cam1/"; // right

    // cout << "path2imgs：" << path2imgs <<endl;

    fTimes.open(strPathTimeFile.c_str());
    string line;

    int cnt = 1;
    vTimestamps.clear();

    while (std::getline(fTimes, line))
    {
        if (cnt >= startFrame && cnt < endFrame) // skip until startframe
        {
            std::istringstream iss(line);
            double timestamp;
            string pathimg1, pathimg2, pathimg3;

            if (!(iss >> timestamp >> pathimg1))
                break;
            vTimestamps.push_back((long long)timestamp);
            // vTimestamps.push_back(timestamp);

            // 时间戳不一样
            // 如果时间戳不一样，把不一样的图像的时间戳换成现在的left基准的时间戳，然后加入到vstrImageFilenames中

            //  时间戳double->string
            stringstream ss;
            string str_timestamp;
            ss << (long long)timestamp;
            ss >> str_timestamp;
            // 1417794166777396.png

            // cout << "rearFile：" << rearFile +  str_timestamp + ".png" << endl;

            vstrImageFilenames[0].push_back(rearFile + str_timestamp + ".png");                  // rear
            vstrImageFilenames[1].push_back(rightFile + str_timestamp + ".png");                 // right
            vstrImageFilenames[2].push_back(path2imgs + "/imgs/cam2/" + str_timestamp + ".png"); // left

            // test single img
            // vstrImageFilenames[0].push_back(rearFile + "1417794166777396.png"); // rear
            // vstrImageFilenames[1].push_back(rightFile + "1417794166777396.png"); // right
            // vstrImageFilenames[2].push_back(path2imgs + "/imgs/cam2/1417794166777396.png"); // left

            // cout << (long long)timestamp << endl;
        }
        ++cnt;
    }
}